package com.yict.csms.baseInfo.entity;

import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "CSMS_PERSON_ORDER_SET")
public class PersonOrderSet {

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "csms_person_order_set_seq")
	@SequenceGenerator(name = "csms_person_order_set_seq", sequenceName = "SEQ_CSMS_PERSON_ORDER_SET", allocationSize = 1, initialValue = 1)
	@Column(name = "SETID")
	private Long setid;
	
	@Column(name = "SETCODE")
	private String setcode;
	
	@Column(name = "SETDESC")
	private String setdesc;
	
	@Column(name = "CWTID")
	private Long cwtid;
	
	@Column(name = "CREATEPERSON")
	private String createperson;
	
	@Column(name = "CREATEDATE")
	private Date createdate;
	
	@Column(name = "UPDATEPERSON")
	private String updateperson;
	
	@Column(name = "UPDATEDATE")
	private Date updatedate;
	
	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name="SETID")
	private Set<PerOrderSetLine> perOrderSetLineSet = new LinkedHashSet<PerOrderSetLine>();

	public Long getSetid() {
		return setid;
	}

	public void setSetid(Long setid) {
		this.setid = setid;
	}

	public String getSetcode() {
		return setcode;
	}

	public void setSetcode(String setcode) {
		this.setcode = setcode;
	}

	public String getSetdesc() {
		return setdesc;
	}

	public void setSetdesc(String setdesc) {
		this.setdesc = setdesc;
	}

	public Long getCwtid() {
		return cwtid;
	}

	public void setCwtid(Long cwtid) {
		this.cwtid = cwtid;
	}

	public String getCreateperson() {
		return createperson;
	}

	public void setCreateperson(String createperson) {
		this.createperson = createperson;
	}

	public Date getCreatedate() {
		return createdate;
	}

	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	public String getUpdateperson() {
		return updateperson;
	}

	public void setUpdateperson(String updateperson) {
		this.updateperson = updateperson;
	}

	public Date getUpdatedate() {
		return updatedate;
	}

	public void setUpdatedate(Date updatedate) {
		this.updatedate = updatedate;
	}

	public Set<PerOrderSetLine> getPerOrderSetLineSet() {
		return perOrderSetLineSet;
	}

	public void setPerOrderSetLineSet(Set<PerOrderSetLine> perOrderSetLineSet) {
		this.perOrderSetLineSet = perOrderSetLineSet;
	}
}
